package com.hhxxttxs.websocket.service.impl;

import com.hhxxttxs.websocket.service.MyWebSocketService;
import com.hhxxttxs.websocket.service.WebSocket;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Data
@Slf4j
public class MyWebSocketServiceImpl implements MyWebSocketService {

    @Autowired
    private WebSocket webSocket;

    @Override
    public void sendMessage() {
        log.info("开始执行sendMessage方法");
        webSocket.sendMessage("Hello,来自服务端的问候！");
        log.info("执行sendMessage方法结束");
    }
}
